package apiPractice;

import java.util.Arrays;
import java.util.Locale;

public class practice02 {
    public static void main(String[] args) {
        String str1="abcdasddfg";
        System.out.println(str1.charAt(5));//s
        String str2= str1.concat("123");
        System.out.println(str2.toString());//abcdasddfg123
        System.out.println(str2.toUpperCase(Locale.ROOT));//ABCDASDDFG123
        System.out.println(str2.startsWith("a"));//true
        System.out.println(str2.endsWith("9"));//false
        System.out.println(str1.indexOf("a"));//0
        System.out.println(str1.lastIndexOf("a"));//4
        System.out.println(str2.indexOf("1"));//10
        String S4=" r e as g1 we";
        System.out.println(S4.split(" "));//
        System.out.println(Arrays.toString(S4.split(" ")));//{r,e,as,g1,we}
        String S5="3231891598414865111969";
        String S6="11110111";
        System.out.println(Arrays.toString(S5.split("1")));
        System.out.println(Arrays.toString(S6.split("1")));
        System.out.println(String.valueOf(888));
        String S7="     asdafdf     ";
        System.out.println(S7.trim());
    }
}
